home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / VD08BIN.ZIP / usr / include / util / keyedlist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-13  |  1.6 KB  |  58 lines

  1. /* -------------------------------------------------------------------
  2.  
  3.     Project: General utility classes
  4.  
  5.     Objective-C interface file for the class KeyedList
  6.  
  7.     COPYRIGHT (C), 1995, Thomas Baier
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Date:                Rev: 0.1
  11.     1995-Aug-01            ___
  12.  
  13.  */
  14.  
  15. #ifndef _KEYEDLIST_H_
  16. #define _KEYEDLIST_H_
  17.  
  18. /*====================================================================
  19.                      Interface of class keyedlist                     
  20. ====================================================================*/
  21. #include "SimpleList.h"
  22.  
  23. @interface KeyedList : SimpleList
  24. {
  25.   id *key;
  26. }
  27.  
  28. /* -------------------------- Initialize -------------------------- */
  29. -initCount: (unsigned long) aCount;
  30.  
  31. /* ----------------------------- Free ----------------------------- */
  32. -free;
  33. -freeObjects;
  34.  
  35. /* ----------- Methods for access to Instance Variables ----------- */
  36.  
  37. /* ------------------------ Public methods ------------------------ */
  38. -addObject: anObject;
  39. -addObject: anObject withKey: aKey;
  40. -insertObject: anObject at: (unsigned long) position;
  41. -insertObject: anObject withKey: aKey at: (unsigned long) position;
  42. -lastKey;
  43. -keyAt: (unsigned long) position;
  44. -removeObjectAt: (unsigned long) position;
  45. -replaceKeyAt: (unsigned long) position with: aKey;
  46. -objectForKey: aKey;
  47. -(unsigned long) indexForKey: aKey;
  48.  
  49. /* ----------------------- Private methods ------------------------ */
  50.  
  51. /* ---------------------- Archiving methods ----------------------- */
  52. -read: (TypedStream *) aStream;
  53. -write: (TypedStream *) aStream;
  54.  
  55. @end
  56.  
  57. #endif
  58.